package com.zhz.model.system;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zhz.common.tool.mybatisplus.base.dal.entity.BasePO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author zhouhengzhe
 * @date 2023/3/21
 */
@Data
@EqualsAndHashCode(callSuper=true)
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "bs_user")
public class User extends BasePO {

    /**
     * {
     *   "username": "1",
     *   "mobile": "1",
     *   "timeOfEntry": "2023-04-01",
     *   "formOfEmployment": "1",
     *   "workNumber": "1",
     *   "departmentName": "总裁办",
     *   "departmentId": "1175310929766055936",
     *   "correctionTime": "2023-04-01"
     * }
     */
    /**
     * 手机号码
     */
    @TableField(MOBILE)
    private String mobile;

    /**
     * 用户名称
     */
    @TableField(USERNAME)
    private String username;

    /**
     * 密码
     */
    @TableField(PASSWORD)
    private String password;

    /**
     * 启用状态 0是禁用，1是启用
     */
    @TableField(ENABLE_STATE)
    private Integer enableState;

    /**
     * 部门ID
     */
    @TableField(DEPARTMENT_ID)
    private String departmentId;

    /**
     * 入职时间
     */
    @TableField(TIME_OF_ENTRY)
    private LocalDate timeOfEntry;

    /**
     * 聘用形式
     */
    @TableField(FORM_OF_EMPLOYMENT)
    private Integer formOfEmployment;

    /**
     * 工号
     */
    @TableField(WORK_NUMBER)
    private String workNumber;

    /**
     * 管理形式
     */
    @TableField(FORM_OF_MANAGEMENT)
    private String formOfManagement;

    /**
     * 工作城市
     */
    @TableField(WORKING_CITY)
    private String workingCity;

    /**
     * 转正时间
     */
    @TableField(CORRECTION_TIME)
    private LocalDate correctionTime;

    /**
     * 在职状态 1.在职  2.离职
     */
    @TableField(IN_SERVICE_STATUS)
    private Integer inServiceStatus;

    /**
     * 企业ID
     */
    @TableField(COMPANY_ID)
    private String companyId;

    @TableField(COMPANY_NAME)
    private String companyName;

    @TableField(DEPARTMENT_NAME)
    private String departmentName;

    /**
     * 用户级别：saasAdmin，coAdmin，user
     */
    @TableField(LEVEL)
    private String level;

    @TableField(STAFF_PHOTO)
    private String staffPhoto;

    /**
     * 离职时间
     */
    @TableField(TIME_OF_DIMISSION)
    private LocalDateTime timeOfDimission;

    public static final String MOBILE = "mobile";

    public static final String USERNAME = "username";

    public static final String PASSWORD = "password";

    public static final String ENABLE_STATE = "enable_state";

    public static final String DEPARTMENT_ID = "department_id";

    public static final String TIME_OF_ENTRY = "time_of_entry";

    public static final String FORM_OF_EMPLOYMENT = "form_of_employment";

    public static final String WORK_NUMBER = "work_number";

    public static final String FORM_OF_MANAGEMENT = "form_of_management";

    public static final String WORKING_CITY = "working_city";

    public static final String CORRECTION_TIME = "correction_time";

    public static final String IN_SERVICE_STATUS = "in_service_status";

    public static final String COMPANY_ID = "company_id";

    public static final String COMPANY_NAME = "company_name";

    public static final String DEPARTMENT_NAME = "department_name";

    public static final String LEVEL = "level";

    public static final String STAFF_PHOTO = "staff_photo";

    public static final String TIME_OF_DIMISSION = "time_of_dimission";
}